package com.larry.mr.kv;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @ProjectName map-reduce
 * @Author larry
 * @Date 21:39 2022/3/29
 * @Description TODO
 **/
public class KVTextMapper extends Mapper<Text,Text,Text, IntWritable> {

    private IntWritable v = new IntWritable(1);

    @Override
    protected void map(Text key, Text value, Context context) throws IOException, InterruptedException {

        context.write(key,v);

    }
}
